/**
 * 修改密码验证 
 */
var originalPassword = false;
var newPassword1 = false;
var newPassword2 = false;

function check(){
	return newPassword2&&newPassword1&&originalPassword;
}

function checknewPassword2(){
	var mypassword2=document.getElementById("newPassword2").value;
    var mypassword1=document.getElementById("newPassword1").value;
    if(!(mypassword2==mypassword1)){
    	newPassword2 = false;
    	alert("两次密码输入不一致");
    }else{
    	newPassword2 = true;
    }
	return newPassword2;
}

function checkoriginalPassword()
{
    var mypassword=document.getElementById("originalPassword").value;
    if(mypassword=="")
    {
    	originalPassword=false;
        alert("请输入原密码！");
    }else{
    	originalPassword = true;
    }
	return originalPassword;
}

function checknewPassword1(){
	var mypassword1=document.getElementById("newPassword1").value;
    if(mypassword1=="")
    {
    	newPassword1=false;
        alert("请输入原密码！");
    }else{
    	newPassword1 = true;
    }
    for(var i=0;i<mypassword1.length;i++)
    {
        var text=mypassword1.charAt(i);
        if(!(text<=9&&text>=0))
        {
        	newPassword1=false;
         	alert("密码只能是数字组成！");
         	break;
        }
    }if(i>=mypassword1.length)
    {
    	newPassword1 = true;
    }
	return newPassword1;
}